{layout name='admin/layout' /}

<div class="col-xs-12">
    <div class="page-header">
        <h1>{:v('headtitle')}</h1>
    </div>
    <form class="form-horizontal" id="form" onsubmit="false" role="form" action="{:url('specUpdate')}">
        <div class="form-group">
            <label class="col-sm-3 control-label no-padding-right"> 规格名称 </label>

            <div class="col-sm-9">
                <input type="text" name="s_name" class="col-xs-10 col-sm-5" value="{$res.s_name}" data-rule="*" data-errmsg="规格名称不可为空"/>
                <span class="help-inline col-xs-12 col-sm-7">
                    <span class="middle">不可为空</span>
                </span>
            </div>
        </div>
        <div class="space-4"></div>

        <div class="form-group">
            <label class="col-sm-3 control-label no-padding-right"> 所属产品 </label>
            <div class="col-sm-2">
                <select name="s_pid" class="form-control">
                    <option value="{$res.product.id}">{$res.product.p_name}</option>
                    {volist name='select' id='v'}
                        <option value="{$v.id}">{$v.p_name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="space-4"></div>

        <div class="form-group">
            <label class="col-sm-3 control-label no-padding-right"> 价格 </label>

            <div class="col-sm-9">
                <input type="text" name="s_price" class="col-xs-10 col-sm-5" value="{$res.s_price}" data-rule="*" data-errmsg="价格不可为空"/>
                <span class="help-inline col-xs-12 col-sm-7">
                    <span class="middle">不可为空</span>
                </span>
            </div>
        </div>
        <div class="space-4"></div>

        <!----------------------修改id------------------------>
        <input type="hidden" name="id" value="{$res.id}" />

        <div class="col-md-offset-3 col-md-9">
            <button class="btn btn-info" type="button" id="submit">
                <i class="icon-ok bigger-110"></i>
                修改
            </button>

            <button class="btn" type="reset">
                <i class="icon-undo bigger-110"></i>
                清空
            </button>
        </div>
    </form>
</div>
